package com.scu.phototabuser;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

import com.scu.phototabuser.ui.home.HomeActivity;
import com.scu.phototabuser.ui.login.login.LoginActivity;
import com.scu.phototabuser.util.PreferenceUtil;

/**
 * Created by tianfei on 2017/4/9.
 */

public class MainDecisionMaker extends Activity {

    private SharedPreferences preference;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //判断是否需要登录验证
        if (PreferenceUtil.isNeedLogin()){
            Intent intent=new Intent(this,LoginActivity.class);
            startActivity(intent);
            finish();

        }else {
            Intent intent = new Intent(this,HomeActivity.class);
            startActivity(intent);
            finish();
        }
    }


}
